package com.zcah.sensitive.common.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

//@org.springframework.context.annotation.Configuration
//public class SparkConfig implements Serializable {
//    @Bean(name = "sparkContext")
//
//    public JavaSparkContext setSparkEnvironment() throws IOException{
//
////        String userKeytabPath = "src/main/resources/conf/sparkuser.keytab";
////        String krb5ConfPath = "src/main/resources/conf/sparkuser_krb5.conf";
////        LoginUtil.login("sparkuser",userKeytabPath,krb5ConfPath, hadoopConf);
//        SparkConf conf = new SparkConf().setAppName("sensitive information found")
//                .setMaster("local[*]");
//        return new JavaSparkContext(conf);
//
//    }
//
//}